import React from 'react';
const webpackNumbersChristmas = require('webpack-numbers-christmas') 
import ClipboardJS from 'clipboard'
import { copyImageToClipboard } from '@utils/clipboard'
// import webpackNumbersChristmas from 'webpack-numbers-christmas'
export default function MyApp() {
  function handleClick() {
    // console.log('You clicked me!',webpackNumbersChristmas);
    // require(['webpack-numbers-christmas'], function (webpackNumbers) {
    //   // ……
    //   console.log('webpackNumbers',webpackNumbers);
    //   webpackNumbers.wordToNum('Two');
    // });
    // 测试地址大图片 https://congra-pub-static-t-1313549115.cos.ap-guangzhou.myqcloud.com/testCDN/%E8%83%8C%E6%99%AF%E5%9B%BE%402x.png
    copyImageToClipboard("https://alifile.hqjy.com/hq/classfile/2023-6-20/ee2a63f4-001b-4f38-a4a9-1d4822641cc9lOmBKx0prTuCzmAN0O2xRooAAAAAAAAAAQ.svg")
  }
  new ClipboardJS('.btn');
  return (
    <div>
      <input id="foo" defaultValue="https://github.com/zenorocha/clipboard.js.git" />

<button className="btn" data-clipboard-target="#foo">
  <img width="20" src="https://clipboardjs.com/assets/images/clippy.svg" alt="Copy to clipboard" />
</button>
      <h1 onClick={handleClick}>my app</h1>
    </div>
  );
}
